<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" v-model='msg' >
        <div>{{msg}}</div>

        <input type="text" :value='msg2' @input='change'>
        <div>{{msg2}}</div>
    </div>
    <script>
        new Vue({
            el:'#app',
            data:{
                msg:1,
                msg2:2,
            },
            methods:{
                change(e){
                    this.msg2=e.target.value
                }
            }
            
        })
    </script>
</body>
</html>